<form action="<?php echo $controller;?>showlist/1" method="get" class="filter-form-wrap" enctype="multipart/form-data">
    <div class="filter-wrap flex-row flex-justify-between flex-align-start flex-nowrap">
        <div class="flex-column flex-justify-center flex-align-start flex-nowrap" style="width: 50%;">
            <div class="flex-row flex-justify-start flex-nowrap flex-align-center marginTB-5">
                <span style="width: 60px;">创建时间</span>
                <input type="text" name="start" id="startpicker" class="marginLR-5" value="<?php if (isset($start)):?><?php echo $start;?><?php endif;?>">
                <span style="width: 20px;">至</span>
                <input type="text" name="end" id="endpicker" class="marginLR-5" value="<?php if (isset($end)):?><?php echo $end;?><?php endif;?>">
            </div>
            <div class="flex-row flex-justify-start flex-nowrap flex-align-center marginTB-5">
                <span style="width: 60px;">海报名称</span>
                <input type="text" name="fname" class="marginLR-5" style="width: 330px;" value="<?php if (isset($fname)):?><?php echo $fname;?><?php endif;?>">
            </div>
        </div>
        <div class="flex-column flex-justify-center flex-align-start flex-nowrap" style="width: 50%;">
            <div class="flex-row flex-justify-start flex-nowrap flex-align-center marginTB-5">
                <span style="width: 60px;">状态</span>
                <select name="fstatus" class="marginLR-5">
                    <option value="">全部</option>
                    <option value="1" <?php if (isset($fstatus)&&$fstatus == 1):?><?php echo 'selected';?><?php endif;?>>
                        展现
                    </option>
                    <option value="2" <?php if (isset($fstatus)&&$fstatus == 1):?><?php echo 'selected';?><?php endif;?>>
                        隐藏
                    </option>
                </select>
            </div>
            <div class="flex-row flex-align-start flex-justify-start marginTB-5">
                <div class="filter-btn btn">筛选</div>
                <div class="reset-btn btn" style="margin:0 10px;">重置</div>
            </div>
        </div>
    </div>
</form>
<script type="text/javascript">
    var config = {showAnim:'drop',dateFormat:'yy-mm-dd',changeMonth:true,changeYear: true,
        monthNamesShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]};
    $('#startpicker').datepicker(config);
    $('#endpicker').datepicker(config);

    $(document).on('click','.other-btn.action-btn',function () {
        var postid = $(this).attr('data-pkey');
        var sort = $(this).attr('data-sort');
        var content = '<fieldset>';
        content+='<label for="sorteditbox">排序</label>';
        content+='<input type="text" name="sorteditbox" style="width:80%;" value="'+sort+'"';
        content+='</fieldset>';
        layer.open({
            title:'',
            type:1,
            content:content,
            offset:'100px',
            btn:['修改','取消'],
            btnAlign:'c',
            yes:function () {
                var sortedit = $('input[name="sorteditbox"]').val();
                layer.confirm('确定保存修改么？',{title:'',offset:'100px'},function (index) {
                    layer.close(index);
                    layer.open({type:3,offset:'100px'});
                    $.ajax({
                        url:'http://admin.nldou.com/admin/salesman/salesmanpostv2/editSort',
                        method:'GET',
                        data:{postid:postid,sort:sortedit},
                        dataType:"json",
                        xhrFields: {withCredentials: true},
                        success:function (res) {
                            layer.closeAll();
                            if(res.code=1) {
                                layer.msg('保存成功',{offset:'100px'});
                            }else{
                                layer.msg('发生错误请重试',{offset:'100px'});
                            }
                            window.location.reload();
                        },
                        timeout:function (res) {
                            layer.closeAll();
                            layer.msg('发生错误请重试',{offset:'100px'});
                        }
                    });
                });
            }
        });
    });
</script>